package com.ssd.controller;

import com.ssd.entity.TaskType;
import com.ssd.service.TaskTypeService;
import com.ssd.view.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * TaskTypeController 类
 *
 * @title:
 * @requirement:
 * @ClassName:
 * @author:首雯静
 * @creationTime:2024/12/19/19:00
 * @version: 1.0
 */
@RestController
@RequestMapping("/manage/taskType")
public class TaskTypeController {

    @Autowired
    private TaskTypeService taskTypeService;

    /**
     * 查询不同工单包含的工单类型
     * @param type
     * @return
     */
    @GetMapping("/list")
    public BaseResponse<List<TaskType>> getList(Integer type){
        List<TaskType> typeList = taskTypeService.getList(type);
        return new BaseResponse<List<TaskType>>(typeList);
    }
}
